package cn.wizzer.app.user.modules.services.account;

import cn.wizzer.app.user.modules.models.UserAccountRecord;
import cn.wizzer.app.user.modules.models.enums.BizTypeEnum;
import cn.wizzer.framework.base.service.BaseService;
import cn.wizzer.framework.page.Pagination;

import java.math.BigDecimal;

public interface UserAccountRecordService extends BaseService<UserAccountRecord> {

    /**
     * 添加流水
     * bizValue < 0 ? sub : add
     */
    void add(String currencyId, String userId, BigDecimal amount, BizTypeEnum bizType, String bizId, String bizNo);

    Pagination listPage(Integer pageNumber, int pageSize, String keyword, BizTypeEnum bizType, String[] searchDate, String currencyId);

    BigDecimal sumAmountByBizTypeAndUserId(BizTypeEnum bizType, String userId);

    Pagination queryWithdrawAndRecharge(String appid, String currencyId, int pageNumber, int pageSize);

}
